<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        [gender='male'] {
            text-decoration: line-through;
            background-color: antiquewhite;
        }
    </style>
</head>

<body>
    <!-- 
        v-bind 绑定属性语法  :[name]='属性名'
     -->
    <div id="app">
        <!-- 动态绑定属性 -->
        <h1 :[name]='value'>姓名：{{value}}</h1>
        <!-- 数组语法 -->
        <h2 :="info">年龄：{{age}}</h2>
    </div>

    <!-- 引入vue.js -->
    <script src="../../js/vue.js"></script>

    <!-- 代码逻辑 -->
    <script>
        const dcl = {
            data() {
                return {
                    name: 'userName',
                    value: 'Jack',
                    userName: 'Steve Jobs',
                    age: 18,
                    info: {
                        gender: 'male',
                        school: 'first school '
                    }
                }
            },
        }
        Vue.createApp(dcl).mount('#app');
    </script>
</body>

</html>